<?php
	$pageCss = array('register');
	$this->load->view('header',array('_user'=>$_user,'pageTitle'=>'注册账号', 'pageCss'=>$pageCss));
?>
<div class="user-login">
	<div class="login">
		<form action="/user/register" method="post" id="userRegForm">
			<fieldset>
				<legend>注册</legend>
				<div class="left-field">
					<div class="form-group">
						<input type="text" class="form-control input-email" id="username" name="username" placeholder="用户名" onblur="checkUserName();" onkeyup="checkUserName();">
						<span class="input-errors"><?php echo isset($errorMessage) ? $errorMessage : '';?></span>
					</div>
					<div class="form-group">
						<input type="text" class="form-control input-email" id="email" name="email" placeholder="邮箱" onblur="checkEmail();" onkeyup="checkEmail();">
						<span class="input-errors"></span>
					</div>
					<div class="form-group">
						<input type="password" class="form-control input-pwd" id="password" name="password" placeholder="密码" onblur="checkPwd();" onkeyup="checkPwd();">
						<span class="input-errors"></span>
					</div>
					<div class="form-group">
						<input type="password" class="form-control input-pwd-repeat" id="password_repeat" name="password_repeat" placeholder="确认密码" onblur="checkPwdRepeat();" onkeyup="checkPwdRepeat();">
						<span class="input-errors"></span>
					</div>
					<div class="form-group captcha-div">
						<input type="text" class="form-control input-captcha" id="captcha" name="captcha" placeholder="验证码" onblur="checkCaptcha();" onkeyup="checkCaptcha();">
						<img id="captcha-img" src="captcha">
						<a href="javascript:void(0);" class="captcha-a">点击刷新</a>
						<span class="input-errors"><?php echo isset($errorCaptcha)? $errorCaptcha:'';?></span>
					</div>
					<div>
						<button type="submit" class="input-submit" id="input-submit">注册</button>
					</div>
				</div>
				<div class="right-field">
					<span>还没有账号?</span>
					<ul>
						<li>现在注册</li>
						<li>忘了密码?</li>
					</ul>
					<span>使用第三方帐号登录</span>
					<ul>
						<li>新浪微博</li>
						<li>QQ账号</li>
					</ul>
				</div>
			</fieldset>
		</form>
	</div>
</div>
<?php
	$pageJs = array('jquery-1.8.3.min', 'register');
	$this->load->view('footer', array('pageJs'=>$pageJs));?>